<!DOCTYPE html>
<html>
    <head>
        <title>用户管理-编辑用户</title>
 		<#include "fsoft-common.ftl" />
    </head>
    <body>
    	<form class="layui-form layui-form-pane" lay-filter="inputFormInfo" action="" method="post">
        <div class="layui-fluid">
            <div class="layui-row">
				<#-- 隐藏域： ID，有ID，是编辑; 无ID，是新增 -->
				<input type="hidden" id="id" name="id" value="${user.id}">
				<input type="hidden" id="orgId" name="orgId" value="${user.orgId}">
				<input type="hidden" id="areaId" name="areaId" value="${user.areaId}">
				<input type="hidden" id="currUserRoleId" value="<#list user.roleIdList as role>${role},</#list>">
				<input type="hidden" id="imgPath" name="imgPath" value="${user.imgPath}">
			  	<div class="layui-col-xs3">
					<div class="layui-upload" id="inputImage" style="padding:3px;">
						<img src="${request.contextPath}/<#if (user.imgPath)??>${user.imgPath}<#else>static/workSpace/image-header.png</#if>" alt="点击修改头像" style="width: 102px">
					</div>
				</div>
				<div class="layui-col-xs9">   
				  	<div class="layui-form-item">
				  		<label for="loginAcct" class="layui-form-label">
				  			<span class="x-red">*</span>登录名
			  			</label>
				      	<div class="layui-input-block">
				      		<input type="text" id="loginAcct" class="layui-input" name="loginAcct" value="${user.loginAcct}" lay-verify="required" lay-reqText="登录名不能为空" autocomplete="off" <#if user.id??>disabled</#if>>
				      	</div>
				  	</div>
			  	</div>
			  	<div class="layui-col-xs9">
				  	<div class="layui-form-item">
				  		<label for="loginAcct" class="layui-form-label">
				  			<span class="x-red">*</span>姓名
			  			</label>
	                    <div class="layui-input-block">
	                          <input type="text" id="userName" class="layui-input" name="userName" value="${user.userName}" lay-verify="required" lay-reqText="姓名不能为空" autocomplete="off">
	                    </div>
					</div>
				</div>
				<div class="layui-form-item">
              		<label for="L_role" class="layui-form-label">
              			<span class="x-red">*</span>角色
          			</label>
                    <div class="layui-input-block">
                    	<div id="roleIdList" class="xm-select-demo"></div>
                	</div>
              	</div>
				<#if !(user.id)?? >
				<div class="layui-form-item">
					<label for="loginAcct" class="layui-form-label">密码</label>
					<div class="layui-input-inline">
						<input type="password" class="layui-input" name="loginPwd" value="123456" autocomplete="off">
					</div>
					<div class="layui-form-mid layui-word-aux">
						<span class="x-red">默认123456</span>
					</div>
				</div>
				</#if>
				<div class="layui-form-item">
              		<label for="L_org" class="layui-form-label">
              			<span class="x-red">*</span>单位
          			</label>
                    <div class="layui-input-block">
                    	<div id="xm-select-orgTrees" class="xm-select-demo"></div>
                	</div>
              	</div>
				<div class="layui-form-item">
              		<label for="L_org" class="layui-form-label">
              			<span class="x-red">*</span>地区
          			</label>
                    <div class="layui-input-block">
                    	<div id="xm-select-areaTrees" class="xm-select-demo"></div>
                	</div>
              	</div>
                <div class="layui-form-item">
                	<label for="phone" class="layui-form-label">手机</label>
                    <div class="layui-input-block">
						<input type="text" id="mobile" class="layui-input" name="mobile" value="${user.mobile}" lay-verify="phone" lay-reqText="请输入正确的手机号" autocomplete="off">
                  	</div>
              	</div>
              	<div class="layui-form-item">
              		<label for="L_email" class="layui-form-label">电子邮箱</label>
                    <div class="layui-input-block">
                    	<input type="text" id="email"  class="layui-input" name="email" value="${user.email}" lay-verify="email" lay-reqText="请输入正确的邮箱" autocomplete="off">
                	</div>
              	</div>
              	<div class="layui-form-item">
              		<label for="F_theme" class="layui-form-label">皮肤</label>
                    <div class="layui-input-block">
                    	<select name="theme" lay-filter="user-theme">
                    		<option value="theme1" <#if user.theme=='theme1'>selected</#if> >简约黑</option>
                    		<option value="theme2" <#if user.theme=='theme2'>selected</#if> >商务风</option>
                    		<option value="theme3" <#if user.theme=='theme3'>selected</#if> >天籁红</option>
                    	</select>
                	</div>
              	</div>
				<div class="layui-col-md6 layui-col-md-offset6">
					<button  class="layui-btn layui-btn-normal" lay-filter="save" lay-submit="">
						<i class="fa fa-save" aria-hidden="true" ></i> 保存
					</button>
				</div>
			</div>
    	</div>
  		</form>
	</body>
    <script type="text/javascript">
	    layui.config({
	    	base:'${request.contextPath}'+'/plugins/layui/extend/',
	    	contentPath: '${request.contextPath}'
	    });
	</script>
	<#-- 引入下拉多选的支持 -->
	<script type="text/javascript" src="${request.contextPath}/plugins/layui/extend/xm-select.js?v=201910"></script>
	<script type="text/javascript" src="${request.contextPath}/static/fsoft-web/user/sysuser-modify.js?v=201910"></script>

</html>
